<?php  

if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class accounts extends CI_Controller {
	function __construct()
	{
		parent::__construct();
		if (!$this->ion_auth->logged_in())
	  	{
			redirect('auth/login');
	  	}		
		$this->load->library('form_validation');
		$this->load->model('accounts/accounts_model');
		$this->load->model('accounts/payment_model');
		$this->load->library('datatables');		
	}
		
	function get(){
		
		echo $this->accounts_model->get_all();
	}	
	
	function view_accounts(){
		
		$this->data['accounts'] = $this->accounts_model->view_accounts()->result();
		$meta['page_title'] = "Payment Lists";		
		 $this->load->view('common/header',$meta);
		$this->load->view('accounts/view_accounts1');
		 $this->load->view('common/footer');
	}

	
}
?>